import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const routes = [
	{
		path: '/', component: ()=> import('../views/home/home'),name: 'Home',meta: {title:'首页',isShowFoot:true},
	},
	{
	    path: '/weixin/heart/beat', component: ()=> import('../views/HeartBeat') ,name: 'HeartBeat'
	},
	{
		path: '/category', component: ()=> import('../views/home/category'),name: 'Category',meta: {title:'书籍分类',isShowFoot:false},
	},
	{
        path: '/block_book_list', component: ()=> import('../views/home/blockBookList'),name: 'BlockBookList',meta: {title:'书籍列表',isShowFoot:true},
    },
	{
		path: '/book_detail', component: ()=> import('../views/home/book_detail'),name: 'BookDetail',meta: {title:'书籍详情',isShowFoot:false},
    },
	{
		path: '/book_list', component: ()=> import('../views/home/book_list'),name: 'BookList',meta: {title:'书籍列表',isShowFoot:true},
	},
	{
		path: '/noData', component: ()=> import('../views/home/noData'),name: 'NoData',meta: {title:'暂无数据',isShowFoot:false},
	},
	{
		path: '/search', component: ()=> import('../views/home/search'),name: 'Search',meta: {title:'搜索',isShowFoot:false},
	},
	{
		path: '/user_index', component: ()=> import('../views/user/userIndex'),name: 'UserIndex',meta: {title:'个人中心',isShowFoot:true},
	},
	{
		path: '/userSet', component: ()=> import('../views/user/set'),name: 'UserSet',meta: {title:'编辑个人信息',isShowFoot:false},
	},
	{
		path: '/favorite', component: ()=> import('../views/user/favorite'),name: 'Favorite',meta: {title:'我喜欢的书',isShowFoot:false},
	},
	{
		path: '/record', component: ()=> import('../views/user/record'),name: 'Record',meta: {title:'我浏览过的书',isShowFoot:false},
	},
	{
		path: '/likeCategory', component: ()=> import('../views/user/likeCategory'),name: 'LikeCategory',meta: {title:'对哪些分类感兴趣',isShowFoot:false},
	},
	{
		path: '/feedback', component: ()=> import('../views/user/feedback'),name: 'Feedback',meta: {title:'意见反馈',isShowFoot:false},
	},
	{
		path: '/bindPhone', component: ()=> import('../views/validate'),name: 'bindPhone',meta: {title:'绑定手机',isShowFoot:false},
	},
	{
		path: '/bindSuccess', component: ()=> import('../views/user/bindSuccess'),name: 'BindSuccess',meta: {title:'手机号绑定成功',isShowFoot:false},
	},
	{
		path: '/validate', component: ()=> import('../views/validate'),name: 'Validate',meta: {title:'修改手机号',isShowFoot:false},
	},
	{
		path: '/setPassword', component: ()=> import('../views/user/setPassword'),name: 'SetPassword',meta: {title:'修改密码',isShowFoot:false},
	},
]


export default new Router({
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: routes
})
